/**
 * The purpose of this class is to assign values to strings and concatenate
 * them.
 * 
 * @author Shawn Rajput
 * 
 */
public class ConcatenationDemo {

	public static void main(String[] args) {

		String oneString = "1";
		String twoString = "2";

		// Integer.parseInt converts string values to integer
		int one = Integer.parseInt(oneString);
		int two = Integer.parseInt(twoString);

		String speed1 = "123";
		String speed2 = " 77";

		// adding two string values after converting to integer
		System.out.println(one + two);

		// adding two String values without any changes
		System.out.println(speed1 + speed2);

		// adding two String values after converting to double
		System.out.println(Double.parseDouble(speed1)
				+ Double.parseDouble(speed2));

		// adding two string values after converting to integer using last
		// example
		System.out.println(Integer.parseInt(oneString)
				+ Integer.parseInt(twoString));

	}

}
